package com.telit.firecommand.controller;//package com.telit.firecommand.controller;
//
//import com.alibaba.excel.util.CollectionUtils;
//import com.alibaba.fastjson.JSON;
//import com.telit.constant.MinioConstants;
//import com.telit.entity.DataReturn;
//import com.telit.util.MinioUtils;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.multipart.MultipartFile;
//
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * Create by Chencf 2022/09/29
// */
//@Api(tags = "文件上传通用接口")
//@RestController
//@RequestMapping("/files")
//public class CommUploadFilesController {
//
//    @PostMapping(value = "/upload", produces = "application/json;charset=UTF-8")
//    @ApiOperation("上传文件通用接口    suffix标志位：firecommand  android  uav 目前传firecommand即可  ")
//    public DataReturn<String> upload(@RequestParam(value = "files") List<MultipartFile> files, @RequestParam(value = "suffix") String suffix) {
//        List<String> imgList = new ArrayList<>();
//        if (!CollectionUtils.isEmpty(files)) {
//            for (MultipartFile file : files) {
//                // 调用minio-server接口传入附件
//                imgList.add(MinioUtils.upload(file, MinioConstants.BUCKET_FORESTRY_NAME, suffix));
//            }
//        }
//        return   DataReturn.ok(JSON.toJSONString(imgList));
//    }
//}
